Consolidate Eshell module loading/unloading code
authorJim Porter <jporterbugs@gmail.com>
Sat, 11 Mar 2023 03:02:26 +0000 (19:02 -0800)
committerJim Porter <jporterbugs@gmail.com>
Wed, 29 May 2024 19:09:05 +0000 (12:09 -0700)
commit6c2f21e4a6ff65cc1697cb8a6ba0e1ef1a52ae1c
tree45e81f3bd365ef76fcf7f08ae00e5bfab9173af3
parent98149ad31ea2cfd5a82f95443affd665c9da667b
Consolidate Eshell module loading/unloading code

This also adds the ability to suppress module loading/unloading
messages, which will be necessary to support running Eshell scripts as
batch scripts.

* lisp/eshell/esh-mode.el (eshell-mode): Move module
loading/initialization to...

* lisp/eshell/esh-module.el (eshell-load-modules)
(eshell-initialize-modules): ... here.
(eshell-module-loading-messages): New option.
(eshell-module--feature-name): Improve docstring.
(eshell-unload-modules): Display a real warning if unable to unload a
module.

* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell)
(eshell-command-result-equal):
* test/lisp/eshell/eshell-tests-unload.el (load-eshell): Silence Eshell
loading messages.
lisp/eshell/esh-mode.el
lisp/eshell/esh-module.el
test/lisp/eshell/eshell-tests-helpers.el
test/lisp/eshell/eshell-tests-unload.el